package com.itluma.isWOak.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.itluma.isWOak.mapper.BillMapper;
import com.itluma.isWOak.pojo.Account;
import com.itluma.isWOak.pojo.NewAccount;
import com.itluma.isWOak.pojo.NewService;

import com.itluma.isWOak.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;


import java.util.List;
     @Service
public class BillServiceImpl implements BillService {
   @Autowired
   private BillMapper billMapper;

         public PageInfo<NewAccount> page1(Integer page, Integer limit) {

             PageHelper.startPage(page, limit);

             List<NewAccount> roles = billMapper.list1();
             PageInfo<NewAccount> pageInfo = new PageInfo<NewAccount>(roles);
             return pageInfo;

             }


    public PageInfo<NewService> page2(Integer page, Integer limit ,Integer billId) {
        PageHelper.startPage(page, limit);
        List<NewService> roles = billMapper.list2(billId);



        PageInfo<NewService> pageInfo = new PageInfo<NewService>(roles);

        return pageInfo;
    }

         @Override
         public PageInfo<NewService> page3(Integer page, Integer limit) {
             PageHelper.startPage(page, limit);

             List<NewService> roles = billMapper.list3();
             PageInfo<NewService> pageInfo = new PageInfo<NewService>(roles);
             return pageInfo;
         }


     }
